﻿using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;

namespace AnyOffice.general.system.menu
{
    public partial class func_delete : ModulePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int funcId = (Request.QueryString["func_id"] != null) ? Convert.ToInt32(Request.QueryString["func_id"].ToString()) : 0;
            new SysFunctionDao().Delete(base.Conn, funcId);
            base.CloseConn();
            if (Request.QueryString["menu_id"] != null)
            {
                Response.Redirect("func.aspx?menu_id=" + Request.QueryString["menu_id"].ToString().Substring(0, 2));
            }
        }

    }
}
